﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using yafc.Interface.Api;

namespace Fanfou.Api
{
	public class Factory : IFactory
	{
		public string ServiceName
		{
			get { return "Fanfou"; }
		}

		public IApi create(ApiType Type)
		{
			switch (Type)
			{
			case ApiType.Login:
				return new Login();

			case ApiType.UserTL:
				return new MyTL();

			case ApiType.Timeline:
				return new FrndTL();

			case ApiType.PostMsg:
				return new SendMsg();
			}

			throw new NotImplementedException("Api of type " 
				+ Enum.GetName(typeof(ApiType), Type) 
				+ " is not implemented.");
		}
	}
}
